import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.统计字符串中字母出现次数
 */

class Main {
    public static void main(String[] args) {
        String string = "H e l l o ! n o w c o d e r";
        Scanner scanner= new Scanner(System.in);
        String word = scanner.next();
        scanner.close();
        System.out.println(check(string, word));
    }

    public static int check(String str, String word) {

        //write your code here......
        int count = 0;
        for(int i = 0; i < str.length();) {
            int temp = str.indexOf(word,i);
            if(temp != -1) {
                i = temp + 1;
                count++;
            } else {
                break;
            }
        }
        return count;

    }
}

public class Test {
}
